home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 February: Tool Chest / Apple Developer CD Series Tool Chest February 1996 (Apple Computer)(1996).iso / Sample Code / DTS QT Utilities.Aug-95 / Projects & Test Apps / MovieShell / Mac Framework / MacMain.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-04-30  |  1.4 KB  |  66 lines  |  [TEXT/MPCC]

  1. /*
  2.     File:        MovieShell.c
  3.  
  4.     Contains:    Simple Mac shell for testing QuickTime.
  5.  
  6.     Written by:    DTS
  7.  
  8.     Copyright:    © 1994-1995 by Apple Computer, Inc., all rights reserved.
  9.  
  10.     Change History (most recent first):
  11.  
  12.        <1>         12/20/94    khs        first file
  13.        
  14. */
  15.  
  16.  
  17. // INCLUDES
  18. #include <stdio.h>
  19. #ifdef __MWERKS__
  20. #include <sioux.h>
  21. #endif // __MWERKS__
  22.  
  23. #include "DTSQTUtilities.h"
  24. #include "MacFramework.h"
  25.  
  26.  
  27. // MAIN
  28. // ______________________________________________________________________
  29. void main(void)
  30. {
  31.     OSErr anErr = noErr;
  32.  
  33. // This is for controlling the sioux window under Metrowerks (5.0 forward)
  34. #ifdef USESIOUX    
  35.     SIOUXSettings.initializeTB = false;
  36.     SIOUXSettings.setupmenus = false;
  37. #endif // USESIOUX    
  38.  
  39.     InitStack(10*1024L);                        // Add 10k more to the stack, for possible QD and Sound Manager needs
  40.     InitMacEnvironment(10L);                    // 10 * MoreMasters
  41.     InitMenubar();
  42.     
  43.     if( !QTUIsQuickTimeInstalled() )
  44.     {
  45.         ShowWarning("\pThe QuickTime extension is not present in this system", 0);
  46.         ExitToShell();
  47.     }
  48.  
  49. #if powerc    
  50.     if( !QTUIsQuickTimeCFMInstalled() )
  51.     {
  52.         ShowWarning("\pThe QuickTime PowerPlug extension is not available (exit)", 0);
  53.         ExitToShell();                                // I could disable features as well.
  54.     }
  55. #endif 
  56.  
  57.     anErr = EnterMovies(); DebugAssert(anErr == noErr);
  58.     if(anErr != noErr)
  59.     {
  60.         ShowWarning("\pCould not initialize the QuickTime environment (exit): ", anErr);
  61.         ExitToShell();
  62.     }
  63.  
  64.     MainEventLoop();
  65. }
  66.